import Layout from '../layout'

/* Router Modules */
import maintenanceRouter from './modules/maintenance'
import historyRouter from './modules/history'
import staticAnalysisRouter from './modules/statisticAnalysis'
import dynamicPlaybackRouter from './modules/dynamicPlayback'
import alarmInfoRouter from './modules/alarm'
import zuoYeDanInfoRouter from './modules/zuoYeDan'

const asyncRoutes = [
  {
    path: '/trainInfo',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/trainInfo/index'),
        name: 'trainInfoDisplay',
        meta: { title: 'trainInfoDisplay', icon: 'trainInfo', roles: ['admin'] }
      }
    ]
  },
  {
    path: '/personInfo',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/personInfo/index'),
        name: 'personInfoDisplay',
        meta: { title: 'personInfoDisplay', icon: 'personInfo', roles: ['admin'] }
      }
    ]
  },
  {
    path: '/gis',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/gis/index'),
        name: 'gis',
        meta: { title: 'gis', icon: 'gis', roles: ['admin'] }
      }
    ]
  },
  {
    path: '/stationMap',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/stationMap/index'),
        name: 'stationMap',
        meta: { title: 'stationMap', icon: 'stationMap', roles: ['admin'] }
      }
    ]
  },
  // {
  //   path: '/playback',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/playback/index'),
  //       name: 'playback',
  //       meta: { title: 'playback', icon: 'playback', roles: ['admin'] }
  //     }
  //   ]
  // },
  // {
  //   path: '/playbackTwo',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/playbackTwo/index'),
  //       name: 'playbackTwo',
  //       meta: { title: 'playbackTwo', icon: 'playback', roles: ['admin'] }
  //     }
  //   ]
  // },
  {
    path: '/historyAlarm',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/historyAlarm/index'),
        name: 'historyAlarm',
        meta: { title: 'historyAlarm', icon: 'history', roles: ['admin'] }
      }
    ]
  },
  // {
  //   path: '/historyZuoYeDan',
  //   component: Layout,
  //   children: [
  //     {
  //       path: 'index',
  //       component: () => import('@/views/historyZuoYeDan/index'),
  //       name: 'historyZuoYeDan',
  //       meta: { title: 'historyZuoYeDan', icon: 'task', roles: ['admin'] }
  //     }
  //   ]
  // },
  /*
   {
     path: '/task',
     component: Layout,
     children: [
       {
         path: 'index',
         component: () => import('@/views/task/index'),
         name: 'task',
         meta: { title: 'task', icon: 'task', roles: ['admin'] }
       }
     ]
   },
   */
  /*{
   path: '/taskControl',
   component: Layout,
   children: [
     {
       path: 'taskControl',
       name: 'taskControl',
       component: () => import('@/views/taskControl/index'),
       meta: { title: 'taskControl', roles: ['admin'] }
     },
   ]
 },*/
  /*{
    path: '/event',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/taskControl/index'),
        name: 'taskControl',
        meta: { title: 'taskControl', icon: 'history',roles: ['admin'] }
      }
    ]
  },*/
  {
    path: '/dataQuery',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/dataQuery/index'),
        name: 'dataQuery',
        meta: { title: 'dataQuery', icon: 'history', roles: ['admin'] }
      }
    ]
  },

  staticAnalysisRouter,

  dynamicPlaybackRouter,

  alarmInfoRouter,

  zuoYeDanInfoRouter,

  // historyRouter,
  maintenanceRouter,

  /** When your routing table is too long, you can split it into small modules**/
  // componentsRouter,
  // chartsRouter,
  // nestedRouter,
  // tableRouter,
  { path: '*', redirect: '/404', hidden: true }
]

export default asyncRoutes
